﻿<%@ Page Title="" Language="C#" MasterPageFile="OnlyTopMasterPage.master" AutoEventWireup="true" CodeFile="ContractorPublicProfile.aspx.cs" Inherits="ContractorPublicProfile" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="../js/jquery-1.4.4.min.js" type="text/javascript"></script>

<link rel="stylesheet" href="../css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="../js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>

<script language="javascript" type="text/javascript">
function ForwardProfile(CompanyID,MemberType)
{
 var oWnd = $find("<%=radWin.ClientID%>");
 oWnd.setUrl("ForwardProfile.aspx?MemberType=" + MemberType + "&CompanyID=" + CompanyID);
 oWnd.show();
}

function InviteForBid(CompanyID)
{
 var oWnd = $find("<%=radWin.ClientID%>");
 oWnd.setUrl("InviteForBid.aspx?CompanyID=" + CompanyID);
 oWnd.show();
}

</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<!-- content block open -->
    <div class="inner_main_content">
      <!-- left col open -->
      <div class="leftcol">

        <!-- page title section open -->
        <div class="pagetitle_bg">
          <div class="pagetitle_wrap">
            <h1 class="maintitle">Profile</h1>
          </div>
        </div>
        <!-- page title section close -->
        <!-- main box open -->

        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">
            <!-- title open -->
            <div class="subtitle_wrap">
              <p class="byr_img_blk">
              <a href="#">
              <%
              if (profileimageObj != null)
                     {%>
                  <img src="../ProfileImages/<%=profileimageObj.ProfileImage %>" alt="" />
                  <%}
                     else
                     { 
                     %>
                     <img src="../images/img.jpg" alt="" />
                     <%} %>
              </a>
              </p>
              <p class="title"><%=companyInfoObj.Companyname %></p>
              <p >( <%=companyInfoObj.CompanyTagLine %> )</p>

            </div>
            <!-- title close -->
            <div class="notifc_cont">
              
              <div class="content">
                <p><strong>Company Overview: </strong><%=companyInfoObj.CompanyOverview %></p>
                <p><strong>Company Description: </strong><%=companyInfoObj.CompanyDescription %></p>
                <p><strong>Service Description: </strong><%=companyInfoObj.ServiceDescription %></p>

              </div>
            </div>
          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <div class="box_sep"></div>
        
        
        <!-- div for certificate open -->
        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">
            <!-- title open -->
            <div class="subtitle_wrap">
              <h1 class="subtitle">Certificates</h1>

            </div>
            <!-- title close -->
            <div class="notifc_cont">
              <div class="certificate">
                <!-- table heading open -->
                <div class="headdrow">
                  <div class="headdrow_lft">
                    <div class="headdrow_rgt">
                      <!-- headings open -->

                      <div class="col1-1"> Name</div>
                      <div class="col2-1">Issuing Authority</div>
                      <div class="col3-1">Issuing Year</div>
                      <!-- headings close -->
                    </div>
                  </div>
                </div>

                <!-- table heading close -->
                <!-- table row open -->
                <%if (DataSourceCertificates.Count > 0)
                  {
                      for (int i=0; i < DataSourceCertificates.Count; i++)
                      {%>
                <div class="tblrow">
                  <div class="col1-1"> <%=DataSourceCertificates[i].CertificateName %></div>
                  <div class="col2-1"> <%=DataSourceCertificates[i].IssuingAuthority %></div>
                  <div class="col3"> <%=DataSourceCertificates[i].IssuingYear %></div>

                </div>
                <%}
                  }
                  else
                  { %>
                <div class="tblrow">
                  <div class="col1-1"> No Certificates yet.</div>
                </div>
                <%} %>
                <!-- table row open -->
              </div>

            </div>
          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <!-- div for certificate close -->
        <div class="box_sep"></div>



         <!-- div for license details open -->

        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">
            <!-- title open -->
            <div class="subtitle_wrap">
              <h1 class="subtitle">License</h1>
            </div>
            <!-- title close -->

            <div class="notifc_cont">
              <div class="license">
                
                 <%if (DataSourceLicense.Count > 0)
                  {
                      for (int i=0; i < DataSourceLicense.Count; i++)
                      {%>
                      
                      <!-- table heading open -->
                <div class="headdrow">
                  <div class="headdrow_lft">
                    <div class="headdrow_rgt">
                      <p>License Number: <%=DataSourceLicense[i].LicenseNumber%></p>
                    </div>

                  </div>
                </div>
                <!-- table heading close -->
                <!-- table row open -->
                <div class="licence_det_wrap">
                  <ul>
                    <li>
                      <div class="col1">License Category </div>

                      <div class="col2"><%=DataSourceLicense[i].LicenseCategory%></div>
                    </li>
                    <li>
                      <div class="col1">License Type </div>
                      <div class="col2"><%=DataSourceLicense[i].LicenseType%></div>
                    </li>
                    

                    <li>
                      <div class="col1">Insured </div>
                      <div class="col2"><%=DataSourceLicense[i].Insured.ToString()%></div>
                    </li>
                    <li>
                      <div class="col1">Boubded </div>
                      <div class="col2"><%=DataSourceLicense[i].Bounded.ToString()%></div>

                    </li>
                    <li>
                      <div class="col1">License expiry date </div>
                      <div class="col2"><%=DataSourceLicense[i].LicenseExpiryDate%></div>
                    </li>
                    <li>

                      <div class="col1">Trade license locale </div>
                      <div class="col2"><%=DataSourceLicense[i].TradeLicenseLocale%></div>
                    </li>
                    <li>
                      <div class="col1">Trade license authority </div>
                      <div class="col2"><%=DataSourceLicense[i].TradeLicenseAuthority%></div>
                    </li>
                  </ul>
                  <div class="license_det">
                    <div class="col1">License Description </div>

                    <div class="col2">
                      <p><%=DataSourceLicense[i].LicenseDescription%></p>
                    </div>
                  </div>
                </div>
                <%}
                  }
                  else
                  { %>
                  
                  <div class="licence_det_wrap">
                  <ul>
                    <li>
                      <div class="col1">No License Yet. </div>
                    </li>
                  </ul>
                </div>
                <%} %>
                <!-- table row open -->
              </div>

            </div>
          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <!-- div for license details close -->
        <div class="box_sep"></div>
        
        
        
        
        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">

            <!-- title open -->
            <div class="subtitle_wrap">
              <h1 class="subtitle">Job History</h1>
            </div>
            <!-- title close -->
            <div class="notifc_cont">
              <div class="job_histry">
                <!-- table heading open -->

                <div class="headdrow">
                  <div class="headdrow_lft">
                    <div class="headdrow_rgt">
                      <!-- headings open -->
                      <div class="col1">Project Name</div>
                      <div class="col2">Category</div>
                      <div class="col4">Amount</div>

                      <div class="col5">Work Status</div>
                      <div class="col6">Feedback</div>
                      <!-- headings close -->
                    </div>
                  </div>
                </div>
                <!-- table heading close -->
                <!-- table row open -->
                <%if (DataSourceBids.Count > 0)
                  {
                      for (int i = 0; i < DataSourceBids.Count; i++)
                      { %>
                <div class="tblrow">
                  <div class="col1">
                    <!-- feedback popup open -->
                    <div class="feed_wrap" id="showfeedtip_<%=i %>">
                      <div class="feed_arrow"></div>
                      <div class="feed_top"></div>

                      <div class="feed_mid_pub">
                        <div class="feedheading"> <a href="#" lang="showfeedtip_<%=i %>"></a>
                          <h1>Employer-to-Contractor Feedback</h1>
                        </div>
                         <%
                          contractObj = ConstructionBidOnline.Biz.Contracts.GetContractsByJobID(DataSourceBids[i].JobID_RKJobs);
                          
                          if ((contractObj != null) && (contractObj.IsContractorFeedBackGiven == true))
                          { %>
                        <div class="feed_body">
                          <div class="rate_blk">
                            <div class="rate_blk_row">
                              <div class="col1">Communiction</div>

                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFC*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFC %></a></span></div>
                            </div>
                            <div class="rate_blk_row">

                              <div class="col1">Scheduling</div>
                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFS*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFS %></a></span></div>

                            </div>
                            <div class="rate_blk_row">
                              <div class="col1">Value (Price)</div>
                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFV*100/5 %>%;">&nbsp;</div>
                                    </div>

              					<span> <a href="#"><%=contractObj.CFFV %></a></span></div>
                            </div>
                            <div class="rate_blk_row">
                              <div class="col1">Problem Resolution</div>
                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>

                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFPR*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFPR %></a></span></div>
                            </div>
                            <div class="rate_blk_row">
                              <div class="col1">Professional</div>
                              <div class="col2">

                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFP*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFP %></a></span></div>
                            </div>
                            <div class="rate_blk_row">
                              <div class="col1">Construction Quality</div>

                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFCQ*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFCQ %></a></span></div>
                            </div>
                            <div class="rate_blk_row">

                              <div class="col1">Jobsite cleanliness</div>
                             <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFJC*100/5 %>%;">&nbsp;</div>
                                    </div>
              					<span> <a href="#"><%=contractObj.CFFJC %></a></span></div>

                            </div>
                            <div class="rate_blk_row">
                              <div class="col1">Adherence budget</div>
                              <div class="col2">
                              <div class="white_progressBar">
                                    <div class="white_star"><img src="../images/prof_white_star.png" alt="" /></div>
                                      <div class="white_progressMeter" style="width: <%=contractObj.CFFAB*100/5 %>%;">&nbsp;</div>
                                    </div>

              					<span> <a href="#"><%=contractObj.CFFAB %></a></span></div>
                            </div>
                          </div>
                          <div class="feed_content">
                            <div class="feed_content_wrap">
                              <h1>Employer to Contractor</h1>
                              <p><%=contractObj.CFComment %> </p>

                            </div>
                            <div class="feed_content_wrap">
                              <h1>Contractor to Employer</h1>
                              <p><%if (contractObj.IsBuyerFeedBackGiven == true) { Response.Write(contractObj.BFComment); } else { Response.Write("Feedback yet not given"); }%> </p>
                            </div>
                          </div>
                        </div>
                        
                        <%}
                          else
                          { %>
                    	<div class="feed_body">
                            Feedback yet not given.
                    	</div>
                    	<%} %>
                      </div>

                      <div class="feed_btm"></div>
                    </div>
                    <!-- feedback popup close -->
                    <p class="feedtip"><a href="#" lang="showfeedtip_<%=i %>" ><%=ConstructionBidOnline.Biz.Job.GetJobByID(DataSourceBids[i].JobID_RKJobs).JobTitle %></a>
                    </p>
                    <span style="display:block; clear:left;">Posted On <%=ConstructionBidOnline.Biz.Job.GetJobByID(DataSourceBids[i].JobID_RKJobs).JobPostedOn %></span></div>
                  <div class="col2"><%=ConstructionBidOnline.Biz.Job.GetJobByID(DataSourceBids[i].JobID_RKJobs).JobCategoryName %></div>
                  <div class="col4">$ <%=DataSourceBids[i].BidAmount%></div>

                  <div class="col5"><%=DataSourceBids[i].BidStatus%></div>
                  <div class="col6">
                  <%
                          contractObj = ConstructionBidOnline.Biz.Contracts.GetContractsByJobID(DataSourceBids[i].JobID_RKJobs);
                          if ((contractObj != null) && (contractObj.IsContractorFeedBackGiven == true))
                          {
                              TotalJobCount++;
                              TotalRating = TotalRating + ((contractObj.CFFC + contractObj.CFFS + contractObj.CFFV + contractObj.CFFPR + contractObj.CFFP + contractObj.CFFCQ + contractObj.CFFJC + contractObj.CFFAB) / 8);
                              %>
                    <div class="white_progressBar">
              	<div class="white_star"><img src="../images/prof_gry_star.png" alt="" /></div>
                  <div class="white_progressMeter" style="width: <%=(((contractObj.CFFC + contractObj.CFFS + contractObj.CFFV + contractObj.CFFPR + contractObj.CFFP + contractObj.CFFCQ + contractObj.CFFJC + contractObj.CFFAB)/8)*100/5)%>%;">&nbsp;</div>
                </div>
              
              <span> <a href="#"><%=((contractObj.CFFC + contractObj.CFFS + contractObj.CFFV + contractObj.CFFPR + contractObj.CFFP + contractObj.CFFCQ + contractObj.CFFJC + contractObj.CFFAB)/8)%></a></span>
                    <%
                          
                          }
                          else
                          { %>
                    	<div class="">
                            Yet not given.
                    	</div>
                    	<%} %>
                   
                  </div>
                </div>
                <!-- table row open -->
                <%}
                  }
                  else
                  { %>
                <!-- table row open -->
                <!-- table row open -->
                <div class="tblrow">
                  <div class="col1">
                    <p>No Jobs.</div>
                </div>
                <%} %>
              </div>
             <%-- <p class="viewall clear"><a href="profile_jobhistory.html">view all...</a></p>--%>
            </div>
          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <div class="box_sep"></div>
        
        
        
        
        
        
        
        
        
        
        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">
            <!-- title open -->
            <div class="subtitle_wrap">
              <h1 class="subtitle">Portfolio</h1>

            </div>
            <!-- title close -->
            <div class="notifc_cont">
            <div class="con_gal_blk">
            <div class="img_gal">
            <ul class="gallery clearfix">
              <%if (DataSourcePortfolioImages.Count > 0)
                {
                    for (int i = 0; i < DataSourcePortfolioImages.Count; i++)
                    {    %>
                       <li> <a href="../Portfolio/Images/<%=DataSourcePortfolioImages[i].FileInfo %>" rel="prettyPhoto[mixed]"><img src="../Portfolio/Images/<%=DataSourcePortfolioImages[i].FileInfo %>" alt="" height="52px" width="62px" /></a> </li>
                    <%}
                }
                else
                { %>
                No images uploaded.
                <%} %>
                </ul>
              </div>
           
            <%--<p class="viewall clear" style="padding-right:20px"><%if (DataSourcePortfolioImages.Count > 3){%><a href="#">view all...</a><%} %></p>--%>

            </div>
            
			<div class="con_gal_blk">
            <div class="vid_gal">
            <%if (DataSourcePortfolioVideos.Count > 0)
                {
                    for (int i = 0; i < DataSourcePortfolioVideos.Count; i++)
                    {    %>
            	<a href="../Portfolio/Videos/<%=DataSourcePortfolioVideos[i].FileInfo %>"><img src="../images/video_img.gif" alt="" /></a>    
                <%}
                }
                else
                { %>
                No videos uploaded.
                <%} %>
            </div>
			  <%--<p class="viewall clear" style="padding-right:20px"><%if (DataSourcePortfolioVideos.Count > 3){%><a href="#">view all...</a><%} %></p>--%>
			  </div>
            </div>

          </div>
          <div class="mainbox_bttm"></div>
        </div>
        
        <div class="box_sep"></div>
        <div class="mainbox_wrap">
          <div class="mainbox_top"></div>
          <div class="mainbox_cont">
            <!-- title open -->
            <div class="subtitle_wrap">

              <h1 class="subtitle">Keywords</h1>
            </div>
            <!-- title close -->
            <div class="notifc_cont">
              <p><%=companyInfoObj.Keywords %></p>
            </div>

          </div>
          <div class="mainbox_bttm"></div>
        </div>
        <!-- main box close -->
      </div>
      <!-- left col close -->
      <!-- right col open -->
      <div class="rightcol">
      <div class="bttns_blok"><a href="javascript: void(0)" onclick="InviteForBid('<%=contractorObj.RegisteredUserID %>')" class="invite_forbid"><img src="../images/trans.gif" alt="" width="1" height="1" /></a></div>

      <div class="bttns_blok clear_bttm"><a href="javascript: void(0)" onclick="ForwardProfile('<%=contractorObj.RegisteredUserID %>','Contractor')" class="forward_profile"><img src="../images/trans.gif" alt="" width="1" height="1" /></a></div>
        
        <div class="bttns_blok"></div>

        <!-- rating and feedback open -->
        <h1 class="right_col_title">Rating and Feedback</h1>
        <div class="cont_rating"><div class="cont_rating_top"><div class="cont_rating_bttm">
          <%--<h1>Six Months</h1>

          <ul>
          	<li><div class="ratingbox">
                	<div class="left">Star Ratings</div>
                	<div class="right"><img src="images/contractor/star.png" alt="" width="18" height="18" /><img src="images/contractor/star.png" alt="" width="18" height="18" /><img src="images/contractor/star.png" alt="" width="18" height="18" /><img src="images/contractor/star.png" alt="" width="18" height="18" /><img src="images/contractor/star.png" alt="" width="18" height="18" /></div>
                </div>
            </li>
            <li><div class="ratingbox">
                	<div class="left">No. of Jobs</div>

                	<div class="right">115</div>
                </div>
            </li>
          </ul>
          <div class="box_sep"></div>--%>
          <h1>Over All</h1>
          <ul>
          	<li><div class="ratingbox">

                	<div class="left">Star Ratings</div>
                	<div class="white_progressBar">
              	<div class="white_star"><img src="../images/prof_gry_star.png" alt="" /></div>
                	<div class="right"><div class="white_progressMeter" style="width: <%if(TotalJobCount > 0) Response.Write((TotalRating/TotalJobCount*100)/5); else Response.Write(0);  %>%;">&nbsp;</div>
                	</div>
                	<%--<%=TotalRating/TotalJobCount %>--%></div>
                </div>
            </li>
            <li><div class="ratingbox">
                	<div class="left">No. of Jobs</div>
                	<div class="right"><%=TotalJobCount %> </div>

                </div>
            </li>
          </ul>
          </div>
        </div></div>
        <!-- rating and feedback close -->
        
        <!-- company detail open -->
         <h1 class="right_col_title">Location</h1>

        <div class="comp_det"><div class="comp_det_top"><div class="comp_det_bttm">

          <ul>
          	<li><div class="ratingbox">
                	<div class="left">Location</div>
                	<div class="right"><p><%=contractorObj.City%></p></div>
                </div>
            </li>

            <li><div class="ratingbox">
                	<div class="left">Last Login</div>
                	<div class="right"><%=contractorObj.LastLoginDate%></div>
                </div>
            </li>
            <li><div class="ratingbox">
                	<div class="left">Member Since</div>

                	<div class="right"><%=contractorObj.RequestDate%></div>
                </div>
            </li>
            <li><div class="ratingbox">
                	<div class="left">Earnings</div>
                	<div class="right"><span>$ 0.00</span></div>
                </div>

            </li>
          </ul>

          
          </div>
        </div></div>
        
        
        
      <!-- company detail close -->
      </div>
       
      <!-- right col close -->
    </div>

    <!-- content block close -->
<telerik:RadWindow ID="radWin" name="radWin" RegisterWithScriptManager="true" 
        DestroyOnClose="false" Height="520px" Width="505px" VisibleStatusbar="false"
        Title="Forward Job" EnableViewState="true" OnClientClose="" 
        KeepInScreenBounds="true" Behaviors="Close, Move, Reload"
        Modal="true"  runat="server" 
        VisibleTitlebar="true" Animation="Resize" 
        AnimationDuration="1000" AutoSize="false"></telerik:RadWindow>
        
        <script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $(".gallery:first a[rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'slow', theme: 'facebook', slideshow: 2000, autoplay_slideshow: false });
                $(".gallery:gt(0) a[rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'fast', slideshow: 10000 });

                $("#custom_content a[rel^='prettyPhoto']:first").prettyPhoto({
                    custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',
                    changepicturecallback: function() { initialize(); }
                });
                $("#custom_content a[rel^='prettyPhoto']:last").prettyPhoto({
                    custom_markup: '<div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',
                    changepicturecallback: function() { _bsap.exec(); }
                });
            });
		</script>
		
		
</asp:Content>

